package com.wanxi.mapper;

import com.wanxi.dto.NewsDTO;
import com.wanxi.model.NewsQuery;
import com.wanxi.model.entity.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NewsMapper {

    List<NewsDTO> findNews(NewsQuery newsQuery);

    List<News> findNewsBack(NewsQuery newsQuery);

    Integer addNews(NewsDTO newsVO);

    Integer updateNews(@Param("id")Long id, @Param("news") NewsDTO news);

    Integer updateNewsState(@Param("id")Long id,@Param("state")Integer state);

}
